﻿using System;
using System.Collections.Generic;
using System.Configuration;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace MarvellousWorks.PracticalPattern.Concept.Configurating
{
    /// <summary>
    /// 整个配置组对象，包括 delegating 和 generics 两个配置节点
    /// </summary>
    public class ChapterConfigurationSectionGroup:ConfigurationSectionGroup
    {
        private const string DelegatingItem = "delegating";
        private const string GenericsItem = "generics";
        public ChapterConfigurationSectionGroup():base()
        {
            
        }

        [ConfigurationProperty(DelegatingItem,IsRequired =true)]
        public virtual DelegatingParagramConfigurationSection Delegating
        {
            get { return base.Sections[DelegatingItem] as DelegatingParagramConfigurationSection; }
        }

        [ConfigurationProperty (GenericsItem,IsRequired =true)]
        public virtual GenericParagramConfigurationSection Generics
        {
            get { return base.Sections.Get(GenericsItem) as GenericParagramConfigurationSection; }
        }

    }
}
